const express = require('express')
const app = express()

/* 引入 cookie 中间件 */
const cookieParser = require("cookie-parser")
app.use(cookieParser())

// cors 解决跨域
// const corsOptions = {
//    origin: ['http://121.199.53.78'],
//    credentials: true
// }
// const cors = require('cors')
// app.use(cors(corsOptions))

// 导入路由
const router = require('./router')
app.use(router)

app.listen(8889, () => {
   console.log('外卖前台接口已启动...')
})